package com.dongbo.recorder.screenrecord.dialog;

import android.content.Context;
import android.widget.TextView;

import com.dongbo.recorder.screenrecord.R;
import com.lxj.xpopup.core.CenterPopupView;

import androidx.annotation.NonNull;

/**
 * @author GuoZi
 * @date :2020/5/4 20:51
 * @description:
 */
public class ProgressPop extends CenterPopupView {
    private TextView progressTv;

    private String tips;

    public ProgressPop(@NonNull Context context,String tips) {
        super(context);
        this.tips = tips;
    }

    @Override
    protected int getImplLayoutId() {
        return R.layout.pop_progress;
    }

    @Override
    protected void onCreate() {
        super.onCreate();
        progressTv = findViewById(R.id.progress_tv);
        progressTv.setText(tips);
    }

    public void setProgress(int progress){
        if(progress != 0){
            progressTv.setText(tips+" "+progress+"%");
        }
    }
}
